package com.dragon.modules.yuegou.query.member;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.dragon.modules.yuegou.entity.member.ShoppingCartEntity;
import com.dragon.modules.yuegou.enums.member.ShoppingCartShoppingType;
import com.dragon.modules.yuegou.mybatis.Condition;
import com.dragon.modules.yuegou.mybatis.Query;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.fasterxml.jackson.annotation.JsonUnwrapped;

import java.time.LocalDateTime;

/**
 * 购物车 动态查询条件
 * 
 * @author pbuilder generated
 * @date 2021-12-29 11:24:34
 * @version 2.0
 */
@JsonInclude(Include.NON_NULL)
public class ShoppingCartQuery extends ShoppingCartEntity implements Query<ShoppingCartEntity> {

    /** 查询条件 */
	@JsonUnwrapped(prefix = "id")
	private Condition<String> idCondition;

    /** 会员id查询条件 */
	@JsonUnwrapped(prefix = "memberId")
	private Condition<String> memberIdCondition;

    /** 商圈ID查询条件 */
	@JsonUnwrapped(prefix = "busdId")
	private Condition<String> busdIdCondition;

    /** 商户ID查询条件 */
	@JsonUnwrapped(prefix = "merchantId")
	private Condition<String> merchantIdCondition;

    /** [枚举]购物车类型：0-优质好货-GOODS、1-到家商品-HOME查询条件 */
	@JsonUnwrapped(prefix = "shoppingType")
	private Condition<ShoppingCartShoppingType> shoppingTypeCondition;

    /** 商品id查询条件 */
	@JsonUnwrapped(prefix = "skuId")
	private Condition<String> skuIdCondition;

    /** 商品数量查询条件 */
	@JsonUnwrapped(prefix = "skuQuantity")
	private Condition<Integer> skuQuantityCondition;

    /** 规格属性 JSON存储查询条件 */
	@JsonUnwrapped(prefix = "skuAttr")
	private Condition<String> skuAttrCondition;

    /** 是否已下单：0 未下单 1 已下单查询条件 */
	@JsonUnwrapped(prefix = "status")
	private Condition<Boolean> statusCondition;

    /** 是否使用会员价查询条件 */
	@JsonUnwrapped(prefix = "useMemberPrice")
	private Condition<Boolean> useMemberPriceCondition;

    /** 查询条件 */
	@JsonUnwrapped(prefix = "createdTime")
	private Condition<LocalDateTime> createdTimeCondition;

    /** 查询条件 */
	@JsonUnwrapped(prefix = "modifiedTime")
	private Condition<LocalDateTime> modifiedTimeCondition;

    /** 逻辑删除，1表示已删除,0表示未删除查询条件 */
	@JsonUnwrapped(prefix = "del")
	private Condition<Boolean> delCondition;

    /** 查询条件 */
	@JsonUnwrapped(prefix = "delTime")
	private Condition<LocalDateTime> delTimeCondition;



	/**
	 * 构造一个查询条件对象
	 */
	public ShoppingCartQuery() {
		super();
	}

	/**
	 * 依据实体对象构造一个查询条件对象
	 * 
	 * @param entity 实体对象
	 */
	public ShoppingCartQuery(ShoppingCartEntity entity) {
		super(entity);
	}

	/**
	 * 依据其它查询条件对象的信息构造一个查询条件对象
	 * 
	 * @param other 查询条件对象
	 */
	public ShoppingCartQuery(ShoppingCartQuery other) {
		super(other);
		if(other.idCondition != null) {
			this.idCondition = other.idCondition.copy();
		}
		if(other.memberIdCondition != null) {
			this.memberIdCondition = other.memberIdCondition.copy();
		}
		if(other.busdIdCondition != null) {
			this.busdIdCondition = other.busdIdCondition.copy();
		}
		if(other.merchantIdCondition != null) {
			this.merchantIdCondition = other.merchantIdCondition.copy();
		}
		if(other.shoppingTypeCondition != null) {
			this.shoppingTypeCondition = other.shoppingTypeCondition.copy();
		}
		if(other.skuIdCondition != null) {
			this.skuIdCondition = other.skuIdCondition.copy();
		}
		if(other.skuQuantityCondition != null) {
			this.skuQuantityCondition = other.skuQuantityCondition.copy();
		}
		if(other.skuAttrCondition != null) {
			this.skuAttrCondition = other.skuAttrCondition.copy();
		}
		if(other.statusCondition != null) {
			this.statusCondition = other.statusCondition.copy();
		}
		if(other.useMemberPriceCondition != null) {
			this.useMemberPriceCondition = other.useMemberPriceCondition.copy();
		}
		if(other.createdTimeCondition != null) {
			this.createdTimeCondition = other.createdTimeCondition.copy();
		}
		if(other.modifiedTimeCondition != null) {
			this.modifiedTimeCondition = other.modifiedTimeCondition.copy();
		}
		if(other.delCondition != null) {
			this.delCondition = other.delCondition.copy();
		}
		if(other.delTimeCondition != null) {
			this.delTimeCondition = other.delTimeCondition.copy();
		}
		if(other.skuAttrCondition != null) {
			this.skuAttrCondition = other.skuAttrCondition.copy();
		}
	}

	@Override
	public QueryWrapper<ShoppingCartEntity> toQueryWrapper() {
		QueryWrapper<ShoppingCartEntity> wrapper = new QueryWrapper<>(this);
		if (idCondition != null) {
			idCondition.toWrapper(wrapper, COL_ID);
		}
		if (memberIdCondition != null) {
			memberIdCondition.toWrapper(wrapper, COL_MEMBER_ID);
		}
		if (busdIdCondition != null) {
			busdIdCondition.toWrapper(wrapper, COL_BUSD_ID);
		}
		if (merchantIdCondition != null) {
			merchantIdCondition.toWrapper(wrapper, COL_MERCHANT_ID);
		}
		if (shoppingTypeCondition != null) {
			shoppingTypeCondition.toWrapper(wrapper, COL_SHOPPING_TYPE);
		}
		if (skuIdCondition != null) {
			skuIdCondition.toWrapper(wrapper, COL_SKU_ID);
		}
		if (skuQuantityCondition != null) {
			skuQuantityCondition.toWrapper(wrapper, COL_SKU_QUANTITY);
		}
		if (skuAttrCondition != null) {
			skuAttrCondition.toWrapper(wrapper, COL_SKU_ATTR);
		}
		if (statusCondition != null) {
			statusCondition.toWrapper(wrapper, COL_STATUS);
		}
		if (useMemberPriceCondition != null) {
			useMemberPriceCondition.toWrapper(wrapper, COL_USE_MEMBER_PRICE);
		}
		if (createdTimeCondition != null) {
			createdTimeCondition.toWrapper(wrapper, COL_CREATED_TIME);
		}
		if (modifiedTimeCondition != null) {
			modifiedTimeCondition.toWrapper(wrapper, COL_MODIFIED_TIME);
		}
		if (delCondition != null) {
			delCondition.toWrapper(wrapper, COL_DEL);
		}
		if (delTimeCondition != null) {
			delTimeCondition.toWrapper(wrapper, COL_DEL_TIME);
		}
		if (skuAttrCondition != null) {
			skuAttrCondition.toWrapper(wrapper, COL_SKU_ATTR);
		}
		return wrapper;
	}

	/**
	 * 构造并返回查询条件
	 * 
	 * @return idCondition 查询条件
	 */
	public Condition<String> id() {
		this.idCondition = new Condition<>();
		return this.idCondition;
	}
	
	/**
	 * 获取查询条件
	 * 
	 * @return idCondition 查询条件
	 */
	public Condition<String> getIdCondition() {
		return idCondition;
	}

	/**
	 * 设置查询条件
	 * 
	 * @param idCondition 查询条件
	 */
	public void setIdCondition(Condition<String> idCondition) {
		this.idCondition = idCondition;
	}

	/**
	 * 构造并返回会员id查询条件
	 * 
	 * @return memberIdCondition 会员id查询条件
	 */
	public Condition<String> memberId() {
		this.memberIdCondition = new Condition<>();
		return this.memberIdCondition;
	}
	
	/**
	 * 获取会员id查询条件
	 * 
	 * @return memberIdCondition 会员id查询条件
	 */
	public Condition<String> getMemberIdCondition() {
		return memberIdCondition;
	}

	/**
	 * 设置会员id查询条件
	 * 
	 * @param memberIdCondition 会员id查询条件
	 */
	public void setMemberIdCondition(Condition<String> memberIdCondition) {
		this.memberIdCondition = memberIdCondition;
	}

	/**
	 * 构造并返回商圈ID查询条件
	 * 
	 * @return busdIdCondition 商圈ID查询条件
	 */
	public Condition<String> busdId() {
		this.busdIdCondition = new Condition<>();
		return this.busdIdCondition;
	}
	
	/**
	 * 获取商圈ID查询条件
	 * 
	 * @return busdIdCondition 商圈ID查询条件
	 */
	public Condition<String> getBusdIdCondition() {
		return busdIdCondition;
	}

	/**
	 * 设置商圈ID查询条件
	 * 
	 * @param busdIdCondition 商圈ID查询条件
	 */
	public void setBusdIdCondition(Condition<String> busdIdCondition) {
		this.busdIdCondition = busdIdCondition;
	}

	/**
	 * 构造并返回商户ID查询条件
	 * 
	 * @return merchantIdCondition 商户ID查询条件
	 */
	public Condition<String> merchantId() {
		this.merchantIdCondition = new Condition<>();
		return this.merchantIdCondition;
	}
	
	/**
	 * 获取商户ID查询条件
	 * 
	 * @return merchantIdCondition 商户ID查询条件
	 */
	public Condition<String> getMerchantIdCondition() {
		return merchantIdCondition;
	}

	/**
	 * 设置商户ID查询条件
	 * 
	 * @param merchantIdCondition 商户ID查询条件
	 */
	public void setMerchantIdCondition(Condition<String> merchantIdCondition) {
		this.merchantIdCondition = merchantIdCondition;
	}

	/**
	 * 构造并返回[枚举]购物车类型：0-优质好货-GOODS、1-到家商品-HOME查询条件
	 * 
	 * @return shoppingTypeCondition [枚举]购物车类型：0-优质好货-GOODS、1-到家商品-HOME查询条件
	 */
	public Condition<ShoppingCartShoppingType> shoppingType() {
		this.shoppingTypeCondition = new Condition<>();
		return this.shoppingTypeCondition;
	}
	
	/**
	 * 获取[枚举]购物车类型：0-优质好货-GOODS、1-到家商品-HOME查询条件
	 * 
	 * @return shoppingTypeCondition [枚举]购物车类型：0-优质好货-GOODS、1-到家商品-HOME查询条件
	 */
	public Condition<ShoppingCartShoppingType> getShoppingTypeCondition() {
		return shoppingTypeCondition;
	}

	/**
	 * 设置[枚举]购物车类型：0-优质好货-GOODS、1-到家商品-HOME查询条件
	 * 
	 * @param shoppingTypeCondition [枚举]购物车类型：0-优质好货-GOODS、1-到家商品-HOME查询条件
	 */
	public void setShoppingTypeCondition(Condition<ShoppingCartShoppingType> shoppingTypeCondition) {
		this.shoppingTypeCondition = shoppingTypeCondition;
	}

	/**
	 * 构造并返回商品id查询条件
	 * 
	 * @return skuIdCondition 商品id查询条件
	 */
	public Condition<String> skuId() {
		this.skuIdCondition = new Condition<>();
		return this.skuIdCondition;
	}
	
	/**
	 * 获取商品id查询条件
	 * 
	 * @return skuIdCondition 商品id查询条件
	 */
	public Condition<String> getSkuIdCondition() {
		return skuIdCondition;
	}

	/**
	 * 设置商品id查询条件
	 * 
	 * @param skuIdCondition 商品id查询条件
	 */
	public void setSkuIdCondition(Condition<String> skuIdCondition) {
		this.skuIdCondition = skuIdCondition;
	}

	/**
	 * 构造并返回商品数量查询条件
	 * 
	 * @return skuQuantityCondition 商品数量查询条件
	 */
	public Condition<Integer> skuQuantity() {
		this.skuQuantityCondition = new Condition<>();
		return this.skuQuantityCondition;
	}
	
	/**
	 * 获取商品数量查询条件
	 * 
	 * @return skuQuantityCondition 商品数量查询条件
	 */
	public Condition<Integer> getSkuQuantityCondition() {
		return skuQuantityCondition;
	}

	/**
	 * 设置商品数量查询条件
	 * 
	 * @param skuQuantityCondition 商品数量查询条件
	 */
	public void setSkuQuantityCondition(Condition<Integer> skuQuantityCondition) {
		this.skuQuantityCondition = skuQuantityCondition;
	}

	/**
	 * 构造并返回规格属性 JSON存储查询条件
	 * 
	 * @return skuAttrCondition 规格属性 JSON存储查询条件
	 */
	public Condition<String> skuAttr() {
		this.skuAttrCondition = new Condition<>();
		return this.skuAttrCondition;
	}
	
	/**
	 * 获取规格属性 JSON存储查询条件
	 * 
	 * @return skuAttrCondition 规格属性 JSON存储查询条件
	 */
	public Condition<String> getSkuAttrCondition() {
		return skuAttrCondition;
	}

	/**
	 * 设置规格属性 JSON存储查询条件
	 * 
	 * @param skuAttrCondition 规格属性 JSON存储查询条件
	 */
	public void setSkuAttrCondition(Condition<String> skuAttrCondition) {
		this.skuAttrCondition = skuAttrCondition;
	}

	/**
	 * 构造并返回是否已下单：0 未下单 1 已下单查询条件
	 * 
	 * @return statusCondition 是否已下单：0 未下单 1 已下单查询条件
	 */
	public Condition<Boolean> status() {
		this.statusCondition = new Condition<>();
		return this.statusCondition;
	}
	
	/**
	 * 获取是否已下单：0 未下单 1 已下单查询条件
	 * 
	 * @return statusCondition 是否已下单：0 未下单 1 已下单查询条件
	 */
	public Condition<Boolean> getStatusCondition() {
		return statusCondition;
	}

	/**
	 * 设置是否已下单：0 未下单 1 已下单查询条件
	 * 
	 * @param statusCondition 是否已下单：0 未下单 1 已下单查询条件
	 */
	public void setStatusCondition(Condition<Boolean> statusCondition) {
		this.statusCondition = statusCondition;
	}

	/**
	 * 构造并返回是否使用会员价查询条件
	 * 
	 * @return useMemberPriceCondition 是否使用会员价查询条件
	 */
	public Condition<Boolean> useMemberPrice() {
		this.useMemberPriceCondition = new Condition<>();
		return this.useMemberPriceCondition;
	}
	
	/**
	 * 获取是否使用会员价查询条件
	 * 
	 * @return useMemberPriceCondition 是否使用会员价查询条件
	 */
	public Condition<Boolean> getUseMemberPriceCondition() {
		return useMemberPriceCondition;
	}

	/**
	 * 设置是否使用会员价查询条件
	 * 
	 * @param useMemberPriceCondition 是否使用会员价查询条件
	 */
	public void setUseMemberPriceCondition(Condition<Boolean> useMemberPriceCondition) {
		this.useMemberPriceCondition = useMemberPriceCondition;
	}

	/**
	 * 构造并返回查询条件
	 * 
	 * @return createdTimeCondition 查询条件
	 */
	public Condition<LocalDateTime> createdTime() {
		this.createdTimeCondition = new Condition<>();
		return this.createdTimeCondition;
	}
	
	/**
	 * 获取查询条件
	 * 
	 * @return createdTimeCondition 查询条件
	 */
	public Condition<LocalDateTime> getCreatedTimeCondition() {
		return createdTimeCondition;
	}

	/**
	 * 设置查询条件
	 * 
	 * @param createdTimeCondition 查询条件
	 */
	public void setCreatedTimeCondition(Condition<LocalDateTime> createdTimeCondition) {
		this.createdTimeCondition = createdTimeCondition;
	}

	/**
	 * 构造并返回查询条件
	 * 
	 * @return modifiedTimeCondition 查询条件
	 */
	public Condition<LocalDateTime> modifiedTime() {
		this.modifiedTimeCondition = new Condition<>();
		return this.modifiedTimeCondition;
	}
	
	/**
	 * 获取查询条件
	 * 
	 * @return modifiedTimeCondition 查询条件
	 */
	public Condition<LocalDateTime> getModifiedTimeCondition() {
		return modifiedTimeCondition;
	}

	/**
	 * 设置查询条件
	 * 
	 * @param modifiedTimeCondition 查询条件
	 */
	public void setModifiedTimeCondition(Condition<LocalDateTime> modifiedTimeCondition) {
		this.modifiedTimeCondition = modifiedTimeCondition;
	}

	/**
	 * 构造并返回逻辑删除，1表示已删除,0表示未删除查询条件
	 * 
	 * @return delCondition 逻辑删除，1表示已删除,0表示未删除查询条件
	 */
	public Condition<Boolean> del() {
		this.delCondition = new Condition<>();
		return this.delCondition;
	}
	
	/**
	 * 获取逻辑删除，1表示已删除,0表示未删除查询条件
	 * 
	 * @return delCondition 逻辑删除，1表示已删除,0表示未删除查询条件
	 */
	public Condition<Boolean> getDelCondition() {
		return delCondition;
	}

	/**
	 * 设置逻辑删除，1表示已删除,0表示未删除查询条件
	 * 
	 * @param delCondition 逻辑删除，1表示已删除,0表示未删除查询条件
	 */
	public void setDelCondition(Condition<Boolean> delCondition) {
		this.delCondition = delCondition;
	}

	/**
	 * 构造并返回查询条件
	 * 
	 * @return delTimeCondition 查询条件
	 */
	public Condition<LocalDateTime> delTime() {
		this.delTimeCondition = new Condition<>();
		return this.delTimeCondition;
	}
	
	/**
	 * 获取查询条件
	 * 
	 * @return delTimeCondition 查询条件
	 */
	public Condition<LocalDateTime> getDelTimeCondition() {
		return delTimeCondition;
	}

	/**
	 * 设置查询条件
	 * 
	 * @param delTimeCondition 查询条件
	 */
	public void setDelTimeCondition(Condition<LocalDateTime> delTimeCondition) {
		this.delTimeCondition = delTimeCondition;
	}


}
